﻿<script src ="scripts/busOrder.js"></script>
<script src ="scripts/httpService.js"></script>
<!--<script src ="scripts/datepicker.js"></script>-->
<script src ="scripts/utility.js"></script>

<div class="pageheader">
	<h2><i class="fa fa-hand-o-up"></i> 假期班车管理 <span>车次管理</span></h2>
</div>

<div class="contentpanel" ng-app="busOrderApp" ng-controller="busOrderCtrl">
	<div class="row xg-content">
		<div class="col-xs-12">

			<div class="btn-group">
				<button type="button" class="btn btn-warning" ng-click="refreshBusOrder()">
					<span class="glyphicon glyphicon-refresh"></span> 刷新
				</button>
				<!--<button type="button" class="btn btn-primary" ng-click="addBusOrder()">-->
				<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-sm">
					<span class="glyphicon glyphicon-pencil"></span> 添加
				</button>
				<button type="button" class="btn btn-success" ng-click="updateBusOrder()">
					<span class="glyphicon glyphicon-send"></span> 更新
				</button>
				<button type="button" class="btn btn-danger" ng-click="deleteBusOrder()">
					<span class="glyphicon glyphicon-trash"></span> 删除
				</button>

			</div>
			<table class="table table-striped table-hover">
				<tr>
					<th>选择</th>
					<th>ID</th>					
					<th>出发时间</th>
					<th>截至加车时间</th>
					<th>车辆数</th>
					<th>座位总数</th>
					<th>已定座数</th>
					<th>备注</th>
				</tr>
				<tr ng-repeat="busOrder in busOrders" ng-click="selectChange($index)">
					<td>
						<input type="checkbox" ng-model="busOrder.checked" />
					</td>
					<td ng-bind="busOrder.id"></td>
		
					<td ng-bind="busOrder.departuredate"></td>
					<td ng-bind="busOrder.endbusdate"></td>
					<td ng-bind="busOrder.busescount"></td>
					<td ng-bind="busOrder.seatscount"></td>
					<td ng-bind="busOrder.occupation"></td>
					<td ng-bind="busOrder.other"></td>
				</tr>
			</table>
		</div>
	</div>
</div><!-- end contentpanel-->

<!-- 模态框内容 -->
<div class="modal fade bs-example-modal-sm xg-holi-bus" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
	<div class="modal-dialog modal-sm" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="myModalLabel">添加班车</h4>
			</div>
			<div class="modal-body">
				<div class="input-group">
					<div class="input-group-addon">方向</div>
					<select class="form-control">
						<option>成都</option>
						<option>基地</option>
					</select>
				</div>
				<div class="input-group">
					<div class="input-group-addon">发车时间</div>
					<input type="text" class="form-control datepicker" data-date-format="yyyy-mm-dd" placeholder="点击选择日期">
				</div>
				<div class="input-group">
					<div class="input-group-addon">截至加车</div>
					<input type="text" class="form-control datepicker" data-date-format="yyyy-mm-dd" placeholder="点击选择日期">
				</div>
				<div>
					<div>备注</div>
					<textarea type="text" placeholder="请添写备注内容"></textarea>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				<button type="button" class="btn btn-primary">确定</button>
			</div>
		</div>
	</div>
</div><!-- end 模态框内容-->

<script src="js/xg_js.js"></script>
<script>
	createMenu(5);
	$('.datepicker').datepicker({
		language: 'zh-CN',
		autoclose: true,
		todayHighlight: true
	});
</script>
